<div class="pad_top">
    <button type="button" ng-click="rebuildLuceneIndex()" class="ice-button">
        Rebuild Indexes
    </button>
    &nbsp;
    <button type="button" ng-click="rebuildBlastIndex()" class="ice-button">
        Rebuild Blast
    </button>
</div>

<div class="pad_top" ng-init="getSetting()" style="width: 98%; height: 543px">
    <uib-tabset>
        <uib-tab>
            <uib-tab-heading><i class="fa fa-gear"></i> General Settings</uib-tab-heading>
            <div class="pad_top" ng-repeat="setting in generalSettings">
                <div class="col-md-3 entryLabel text-right">
                    <span ng-class="{'entryLabel':!setting.editMode, 'entryEditLabel':setting.editMode}">{{setting.key}}</span>
                </div>

                <!--for boolean fields only-->
                <div class="col-md-9" ng-if="setting.isBoolean">
                    <i class="cursor_pointer fa fa-fw" ng-click="submitBooleanSetting(setting)"
                       ng-class="{'fa-toggle-on green font-14em':setting.value != undefined && setting.value.toLowerCase() === 'yes',
                       'fa-toggle-off font-14em opacity_hover':setting.value == undefined || setting.value.toLowerCase() !== 'yes'}"></i>
                </div>

                <!--for non boolean fields-->
                <div class="col-md-9" ng-if="!setting.isBoolean" ng-mouseover="partIdEdit=true"
                     ng-mouseout="partIdEdit=false">
                    <div data-ng-if="!setting.editMode">
                        <span ng-if="setting.value.trim() !==''">{{setting.value.trim()}}</span>
                        <i class='opacity_4' ng-if="!setting.value">No value entered</i>
                        <span ng-click="setting.editMode=true">
                        <i ng-show="partIdEdit" class="fa fa-pencil edit_icon"
                           style="margin-left: 5px; font-size: 14px;"></i></span>
                    </div>

                    <div class="input-group" data-ng-if="setting.editMode">
                        <form ng-submit="submitSetting(setting)">
                            <input type="text" ng-model="setting.value" class="input_box_group" maxlength="125"
                                   style="width: 205px;">
                        </form>
        <span class="input-group-addon" data-ng-click="setting.editMode=false" style="padding:3px; background-color:
         #f1f1f1;width: 19px"><i class="fa fa-times delete_icon"></i></span>
                    </div>
                </div>


            </div>
        </uib-tab>

        <uib-tab>
            <uib-tab-heading><i class="fa fa-envelope"></i> Email Settings</uib-tab-heading>
            <div class="pad_top" ng-repeat="setting in emailSettings">
                <div class="col-md-3 entryLabel text-right">
                    <span ng-class="{'entryLabel':!setting.editMode, 'entryEditLabel':setting.editMode}">{{setting.key}}</span>
                </div>

                <!--for boolean fields only-->
                <div class="col-md-9" ng-if="setting.isBoolean">
                    <i class="cursor_pointer fa fa-fw" ng-click="submitBooleanSetting(setting)"
                       ng-class="{'fa-toggle-on green font-14em':setting.value != undefined && setting.value.toLowerCase() === 'yes',
                       'fa-toggle-off font-14em opacity_hover':setting.value == undefined || setting.value.toLowerCase() !== 'yes'}"></i>
                </div>

                <!--for non boolean fields-->
                <div class="col-md-9" ng-if="!setting.isBoolean" ng-mouseover="partIdEdit=true"
                     ng-mouseout="partIdEdit=false">
                    <div data-ng-if="!setting.editMode"><span ng-if="setting.value&&setting.value.trim()!=''">{{setting.value}}</span>
                        <i class='opacity_4' ng-if="!setting.value">No value entered</i><span
                                ng-click="setting.editMode=true">
                         <i ng-show="partIdEdit" class="fa fa-pencil edit_icon"
                            style="margin-left: 5px; font-size: 14px;"></i></span>
                    </div>

                    <div class="input-group" data-ng-if="setting.editMode">
                        <form ng-submit="submitSetting(setting)">
                            <input type="text" ng-model="setting.value" class="input_box_group" maxlength="125"
                                   style="width: 205px;">
                        </form>
        <span class="input-group-addon" data-ng-click="setting.editMode=false" style="padding:3px; background-color:
     #f1f1f1;width: 19px"><i class="fa fa-times delete_icon"></i></span>
                    </div>
                </div>
            </div>
        </uib-tab>

    </uib-tabset>
</div>




